import request from '@/utils/request'

// 查询订单关联设备列表
export function listOrderDevice(query) {
  return request({
    url: '/system/orderDevice/list',
    method: 'get',
    params: query
  })
}

// 查询订单关联设备详细
export function getOrderDevice(id) {
  return request({
    url: '/system/orderDevice/' + id,
    method: 'get'
  })
}

// 新增订单关联设备
export function addOrderDevice(data) {
  return request({
    url: '/system/orderDevice',
    method: 'post',
    data: data
  })
}

// 修改订单关联设备
export function updateOrderDevice(data) {
  return request({
    url: '/system/orderDevice',
    method: 'put',
    data: data
  })
}

// 删除订单关联设备
export function delOrderDevice(id) {
  return request({
    url: '/system/orderDevice/' + id,
    method: 'delete'
  })
}
//批量锁定设备
export function lockDeviceByIds(ids) {
  return request({
    url: '/system/orderDevice/lockDevice/'+ids,
    method: 'get',
  })
}
//批量解锁设备
export function unLockDeviceByIds(ids) {
  return request({
    url: '/system/orderDevice/unLockDevice/'+ids,
    method: 'get',
  })
}
